package com.rlz.base.tools.expand

import android.util.Patterns

/**
 * Created by RLZ
 * on 2021/4/16
 *
 * String 的扩展函数 可以发挥想象力 自由添加方法
 */


fun String.isValidEmail(): Boolean
        = this.isNotEmpty() && Patterns.EMAIL_ADDRESS.matcher(this).matches()


fun String?.valid() : Boolean =
        this != null && !this.equals("null", true)
                && this.trim().isNotEmpty()